{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href={% static 'plugins/bootstrap-3.4.1-dist/css/bootstrap.min.css' %}>
    <style>
        .account {
            width: fit-content;
            min-width: 300px; /* 避免内容过窄 */
            max-width: 100%; /* 防止在小屏幕上溢出 */
            margin: 130px auto 0; /* 保持居中 */
            padding: 20px 40px;
            border-radius: 10px;
            box-shadow: 10px 5px 20px #aaa;
        }

        .account h2 {
            text-align: center;
        }
    </style>
</head>
<body>
<div class="account">
    <h2>用户登录</h2>
    <form method="post" novalidate>
        {% csrf_token %}
        <div class="form-group">
            <label>用户名</label>
            {{ form.username }}
            <span style="color: red">{{ form.username.errors.0 }}</span>
        </div>
        <div class="form-group">
            <label>密码</label>
            {{ form.password }}
            <span style="color: red">{{ form.password.errors.0 }}</span>
        </div>
{#        <div class="form-group">#}
{#            <label for="id-code">图片验证码</label>#}
{#            <div class="row">#}
{#                <div class="col-xs-7">#}
{#                    {{ form.code }}#}
{#                    <span style="color: red">{{ form.code.errors.0 }}</span>#}
{#                </div>#}
{#                <div class="col-xs-5">#}
{#                    <img id="image_code" src="/image/code/" style="width: 125px">#}
{#                </div>#}
{#            </div>#}

{#        </div>#}
        <div class="form-group">
            <button type="submit" class="btn btn-primary">登 录</button>
        </div>
    </form>
</div>

</body>
</html>